1. Field of the Invention
The present invention relates to an image compression and decompression method for encoding and decoding pixel data, and more particularly, to an image compression and decompression method for encoding and decoding pixel data based on a color conversion method.
2. Description of the Prior Art
In many color-processing applications, it is often necessary to convert data between two color spaces. A color space is a region in a 3-dimensional or higher dimensional vector space. Any basis, such as three linearly independent 3-dimensional vectors, defines a color coordinate system. A commonly used color coordinate system is the R (red), G (green), and B (blue), defined by their center wavelengths. Given one 3-dimensional color coordinate system, other 3-dimensional linear color coordinate systems may be represented by a 3.times.3 matrix. For example, the Y, I, Q color coordinate system is defined in terms of R, G, B by the following matrix:
      [                            Y                                      I                                      Q                      ]    =            [                                    0.299                                0.587                                0.114                                                              -              0.1678                                                          -              0.3313                                            0.5                                                0.5                                              -              0.4187                                                          -              0.0813                                          ]        ⁡          [                                    R                                                G                                                B                              ]      
Note that not all color spaces are linear. For example, to better model the human visual system, some color conversions attempt to non-linearly re-scale vectors (e.g., logarithmically). Examples are CIE L*u*v* and L*a*b*.
Different color coordinate systems are defined for various reasons. For example, for data to be displayed on monitors, it is convenient for most digital color images to use the R, G, B coordinate system, in fixed range, such as 6 bits per coordinate. If the application requires color compression for storing or transmitting large amounts of color image data, then the RGB representation is far from optimal. U.S. Pat. No. 5,731,988 issued on Mar. 24, 1998 to Zandi et al. discloses a method for reversible color conversion shown by the following matrix:
      [                            Ya                                      Yb                                      Yc                      ]    =            [                                    0.25                                0.5                                0.25                                                0                                              -              1                                            1                                                1                                              -              1                                            0                              ]        ⁡          [                                    R                                                G                                                B                              ]      
The luminance component in this representation is:
  Ya  =            R      +              2        ⁢        G            +      B        4  
The chrominance components are:Yb=B−G Yc=R−G 
Data compression is an extremely useful tool for storing and transmitting large amounts of data. For example, the time required to transmit an image is reduced drastically when compression is used to decrease the number of bits required to recreate the image. Many different data compression techniques exist in the prior art. Compression techniques can be divided into two broad categories: lossy coding and lossless coding. In lossless compression, all the information is retained and the data is compressed in a manner that allows for perfect reconstruction. Lossy coding involves coding that results in the loss of information, such that there is no guarantee of perfect reconstruction of the original data. The goal of lossy compression is that changes to the original data are done in such a way that they are not objectionable or detectable.
Therefore in lossy compression, what is desired is a color conversion method capable of encoding input symbols or intensity data prior to conversion into output data and capable of reconstructing original input data from the output data. In the desired color conversion method data compression is achieved by encoding, which is intended to preserve relevant characteristics of the input data while eliminating less important data.